#include "lib_a.h"
#include "lib_e.h"
#include <iostream>

int main() {
    std::cout << "=== Complex Dependencies Test Program H ===" << std::endl;
    std::cout << "Dependencies: h -> a,e | a -> b,c,d | e -> c,f" << std::endl;
    std::cout << std::endl;
    
    // 初始化库A（会初始化b,c,d）
    std::cout << "--- Initializing LibA ---" << std::endl;
    LibA::init();
    std::cout << std::endl;
    
    // 初始化库E（会初始化c,f）
    std::cout << "--- Initializing LibE ---" << std::endl;
    LibE::init();
    std::cout << std::endl;
    
    // 使用库A的功能
    std::cout << "--- Using LibA ---" << std::endl;
    LibA::process();
    std::cout << std::endl;
    
    // 使用库E的功能
    std::cout << "--- Using LibE ---" << std::endl;
    LibE::execute_workflow();
    std::cout << std::endl;
    
    // 清理
    std::cout << "--- Cleanup ---" << std::endl;
    LibE::finalize();
    LibA::finalize();
    
    std::cout << std::endl;
    std::cout << "=== Complex Dependencies Test Completed ===" << std::endl;
    
    return 0;
}